/*
<license>
Copyright (c) 2008, Chris Venter <chris.venter@gmail.com>
All rights reserved.

This file is part of quicktag <http://code.google.com/p/quicktag/>

quicktag is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.

quicktag is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this code.
If not, see <http://www.gnu.org/licenses/>.
</license>
*/
#include "asf_tag.h"

#include "asffile.h"

#include <generik/stringutils.h>

#include <generik/tracing.h>

namespace quicktag
{

	int read_asf(const std::string& filename, quicktag::tags& tags)
	{
		GENERIK_TRACER;
		asffile file(filename);
		
		if (file.isvalid())
		{
			tags.tracknr = file.get("WM/TrackNumber");
			tags.title = file.get("Title");
			tags.album = file.get("WM/AlbumTitle");
			tags.artist = file.get("WM/AlbumArtist");
			tags.genre = file.get("WM/Genre");
			return READVAL_OK;
		}
		return READVAL_FAIL;
	}

}











